Skip to content

docs: add MkDocs Material site with versioned GitHub Pages deployment#21

Merged
aseguragonzalez merged 5 commits into
mainfrom
docs/add-docs-website
May 25, 2026
Merged

docs: add MkDocs Material site with versioned GitHub Pages deployment#21
aseguragonzalez merged 5 commits into
mainfrom
docs/add-docs-website

Conversation

@aseguragonzalez
Copy link
Copy Markdown
Owner

@aseguragonzalez aseguragonzalez commented May 25, 2026

Summary

  • Adds mkdocs-material and mike as dev dependencies (pinned via uv.lock) for local preview and versioned deployment
  • Configures MkDocs Material theme with navigation.tabs, navigation.top, code copy/annotate, and Mermaid diagram rendering via pymdownx.superfences + extra_javascript init script
  • Creates docs/index.md as the site home page, adapted from the root README.md
  • Adds .github/workflows/docs.yml that deploys versioned docs to GitHub Pages via uv run mike deploy, triggered by:
    • v* release tags
    • Any push to main that touches docs/** or mkdocs.yml (with paths filter to avoid spurious deploys)
    • Manual workflow_dispatch
  • Version labels are normalized (leading v stripped) so tag pushes, branch pushes, and manual deploys all produce the same format (e.g. 0.4.0)

Test plan

  • Run uv sync && uv run mkdocs serve and verify all pages render, including Mermaid diagrams in architecture.md and best-practices.md
  • Trigger workflow_dispatch from GitHub Actions UI with 0.4.0 for the initial deploy (requires gh-pages branch to exist and GitHub Pages enabled in repo Settings → Pages → Source: branch gh-pages)
  • Verify the version selector appears in the deployed site
  • Verify that a push to main touching only src/ does not trigger the docs workflow

🤖 Generated with Claude Code

- Add mkdocs-material and mike to dev dependencies
- Configure MkDocs Material with navigation tabs, code copy, and Mermaid
  diagram support via pymdownx.superfences
- Add docs/index.md as the site home page (adapted from README)
- Add GitHub Actions workflow to deploy versioned docs on release tags
  via mike, with manual workflow_dispatch for initial deploy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 20:11
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a MkDocs Material documentation site for the project and adds a GitHub Actions workflow to publish versioned documentation to GitHub Pages using mike, aligning the repo’s existing docs/ content with a navigable docs site.

Changes:

  • Add mkdocs-material and mike to the dev dependency group (and update uv.lock accordingly).
  • Add mkdocs.yml configuring MkDocs Material, navigation, and mike versioning.
  • Add a Docs GitHub Actions workflow to deploy versioned documentation on v* tags (and via manual dispatch).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Locks new dev dependencies required for MkDocs Material + mike.
pyproject.toml Adds mkdocs-material and mike to the dev dependency group.
mkdocs.yml Defines the MkDocs Material site config, nav, and mike plugin settings.
docs/index.md Adds a MkDocs home page adapted from the project README.
.github/workflows/docs.yml Deploys versioned docs to gh-pages on tags / manual trigger.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mkdocs.yml
Comment thread .github/workflows/docs.yml Outdated
@aseguragonzalez aseguragonzalez self-assigned this May 25, 2026
aseguragonzalez and others added 4 commits May 25, 2026 22:25
pymdownx.superfences only assigns the .mermaid CSS class; the JS bundle
must be loaded explicitly for client-side rendering. Add mermaid@11 via
unpkg and an init script that re-runs Mermaid on every Material page
navigation via document$.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace pip install mkdocs-material mike with astral-sh/setup-uv + uv sync
so the docs job uses the pinned uv.lock and matches the CI convention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add paths filter so any push to main that touches docs/ or mkdocs.yml
also publishes the site, not just release tags. Introduce a Resolve version
step that picks the right version per trigger: workflow_dispatch input,
tag name, or the last released version from semantic_release when triggered
by a branch push.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tag names (v0.4.0) and semantic_release output (0.4.0) were producing
inconsistent version directories. Strip the leading v from all sources
so every trigger produces the same label format (e.g. 0.4.0).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aseguragonzalez aseguragonzalez merged commit 21471bd into main May 25, 2026
9 checks passed
@aseguragonzalez aseguragonzalez deleted the docs/add-docs-website branch May 25, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants